package com.chinhnd.booze.activity;

import java.util.ArrayList;

import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.GridView;

import com.chinhnd.booze.R;
import com.chinhnd.booze.adapter.AdapterCategory;
import com.chinhnd.booze.model.Category;

public class CategoryActivity extends BaseActivity {
	GridView mGvCategory;
	ArrayList<Category> mListCategory;
	AdapterCategory mAdapterCategory;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_category);

		mGvCategory = (GridView) findViewById(R.id.category_gv);
		mListCategory = new ArrayList<Category>();
		mAdapterCategory = new AdapterCategory(this, mListCategory);
		mGvCategory.setAdapter(mAdapterCategory);

		for (int i = 0; i < 80; i++) {
			Category category = new Category("" + i, "Category " + i);
			mListCategory.add(category);
		}
		mAdapterCategory.notifyDataSetChanged();
	}

	public class LoadCategory extends AsyncTask<Void, Void, Void> {

		@Override
		protected void onPostExecute(Void result) {
			showProgress();
		}

		@Override
		protected Void doInBackground(Void... params) {
			return null;
		}

		@Override
		protected void onPreExecute() {

		}

	}

	public void onClick_Back(View v) {

	}

	public void onClick_Home(View v) {

	}

	public void onClick_Setting(View v) {

	}

}
